/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 亮色主题 (默认) - 灰色调背景，让粒子更明显 */
:root {
  --bg-primary: #f5f5f5;
  --bg-secondary: #ebebeb;
  --bg-tertiary: #e0e0e0;
  --border-color: #c8c8c8;
  --text-primary: #24292f;
  --text-secondary: #57606a;
  --text-link: #0969da;
  --text-link-hover: #0550ae;
  --success-color: #1a7f37;
  --success-hover: #2da44e;
  --danger-color: #cf222e;
  --danger-hover: #a40e26;
  --warning-color: #9a6700;
  --primary-color: #42b883;
  --primary-hover: #33a06f;
  
  /* 按钮阴影 */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  
  /* 滚动条 */
  --scrollbar-track: #ebebeb;
  --scrollbar-thumb: #c8c8c8;
  --scrollbar-thumb-hover: #a8a8a8;
  
  /* 模态框覆盖层 */
  --modal-overlay: rgba(0, 0, 0, 0.5);
}

/* 暗色主题 */
.dark-theme {
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --border-color: #30363d;
  --text-primary: #c9d1d9;
  --text-secondary: #8b949e;
  --text-link: #58a6ff;
  --text-link-hover: #79c0ff;
  --success-color: #238636;
  --success-hover: #2ea043;
  --danger-color: #da3633;
  --danger-hover: #f85149;
  --warning-color: #d29922;
  --primary-color: #42b883;
  --primary-hover: #33a06f;
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  
  --scrollbar-track: #161b22;
  --scrollbar-thumb: #21262d;
  --scrollbar-thumb-hover: #30363d;
  
  --modal-overlay: rgba(0, 0, 0, 0.7);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  position: relative;
}

/* 确保所有页面内容在粒子背景之上 */
.header,
.main-content,
.footer,
.container {
  position: relative;
  z-index: 1;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

/* 按钮通用样式 - 优化版 */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background: linear-gradient(135deg, #42b883 0%, #35a372 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(66, 184, 131, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #35a372 0%, #2d8f61 100%);
  box-shadow: 0 6px 16px rgba(66, 184, 131, 0.4);
}

.btn-primary:active {
  box-shadow: 0 2px 8px rgba(66, 184, 131, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, #238636 0%, #2ea043 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(35, 134, 54, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #2ea043 0%, #3fb950 100%);
  box-shadow: 0 6px 16px rgba(35, 134, 54, 0.4);
}

.btn-success:active {
  box-shadow: 0 2px 8px rgba(35, 134, 54, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #da3633 0%, #f85149 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(218, 54, 51, 0.3);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #f85149 0%, #ff6b6b 100%);
  box-shadow: 0 6px 16px rgba(218, 54, 51, 0.4);
}

.btn-danger:active {
  box-shadow: 0 2px 8px rgba(218, 54, 51, 0.3);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn:disabled::before {
  display: none;
}

/* 大号按钮 */
.btn-large {
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 10px;
}

/* 小号按钮 */
.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 6px;
}

/* 块级按钮 */
.btn-block {
  width: 100%;
  display: block;
}

/* 输入框通用样式 */
.input {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(66, 184, 131, 0.1);
}

.input::placeholder {
  color: var(--text-secondary);
}

/* 卡片样式 */
.card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
}

.card:hover {
  border-color: var(--text-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* 链接样式 */
a {
  color: var(--text-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--text-link-hover);
  text-decoration: underline;
}

/* 通用容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 加载动画 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--border-color);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 消息提示 */
.message {
  padding: 12px 16px;
  border-radius: 6px;
  margin: 10px 0;
  border-left: 4px solid;
}

.message-success {
  background-color: rgba(35, 134, 54, 0.1);
  border-color: var(--success-color);
  color: #3fb950;
}

.message-error {
  background-color: rgba(218, 54, 51, 0.1);
  border-color: var(--danger-color);
  color: #f85149;
}

.message-warning {
  background-color: rgba(210, 153, 34, 0.1);
  border-color: var(--warning-color);
  color: var(--warning-color);
}

/* 表格样式 */
.table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
}

.table th,
.table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  background-color: var(--bg-tertiary);
  font-weight: 600;
  color: var(--text-primary);
}

.table tr:hover {
  background-color: var(--bg-tertiary);
}

.table tr:last-child td {
  border-bottom: none;
}

/* 模态框样式 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--modal-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.modal-body {
  margin-bottom: 16px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

